<div class="container">
  <div class="clear c25"></div>
  <a class="head">My Profile</a>
  <div class="clear c60"></div>
  <div class="left">
    <div class="boxy">
      <div class="content_box">
        <a class="subhead" style="border-top:solid black;">User Picture</a>
        <% if @user.user_photo.blank? %>
          <%= image_tag('default_thumbnail.png')%>
          <% form_for :user, @user, :url => "/users/upload" , :html => { :multipart => true } do |form| %>
            <div class="clear c25">&nbsp;</div>
            <p class="spacehead">Upload Picture</p>
            <%= form.file_field :uploaded_data,:size =>10 %> <br>
            <%= form.submit "Upload" %>
          <% end %>
        <% else %>
          <%= image_tag(@user.user_photo.public_filename)%>
          <br><br>
          <%= link_to "Change Picture","/users/change_picture",:with =>@user.id %>
        <% end %>
      </div>
    </div>
  </div>
  <div class="right">
    <div class="boxy ">
      <div class="content_box" style="height:160px">
        <a class="subhead">User Data</a>
        <div class="show" >
          <%= label_tag "login", "User Name: #{@user.login}"  %>
          <%= label_tag "username", "First Name: #{@user.firstname }"  %>
          <%= label_tag "lastname", "Last Name: #{@user.lastname} "  %>
          <%= label_tag "email", "Email: #{@user.email}"  %>
        </div>
      </div>
    </div>
  </div>
  <div class="self">
    <div class="boxy" >
      <div class="long ">
        <% form_tag "/users/change_password"  do %>
          <a class="subhead">Change Password</a>
          <div class="forms ">
            <%= label_tag "old_password", "Old Password :" %>
            <%= password_field_tag :old_password%>

            <%= label_tag "new_password", "New Password :" %>
            <%= password_field_tag :new_password%>

            <%= label_tag "new_password_confirmation", "New Password Confirmation :" %>
            <%= password_field_tag :new_password_confirmation%>

            <%= submit_tag "Change Password" %>
          </div>
        </div>
      <% end %>
    </div>
  </div>
</div>

